<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.bootcss.com/jquery/1.11.3/jquery.js"></script>
</head>
<body>
<button id="submittest" type="button">button</button>
<script>
    $(function () {
        $("#submittest").click(function(){
            $.get('test2.php',function (ret) {
                console.log(ret);
            })
        })

    })
</script>
</body>
</html>